<?php
include_once('conn.php');
session_start();
$username=$_SESSION['username'];
$sel="select * from user where username='$username'";
$tes=mysqli_query($conn,$sel);
$row = mysqli_fetch_assoc($tes);
//$path = '/photo/1.jpg';
?>
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Chris</title>
    <style>
        body {
            margin: 0;
            padding: 0;
            background-image: url("./1.jpg");
            background-repeat: no-repeat;
            background-size: cover;
            background-color: lightslategray;
        }

        .box {
            color: rgb(6, 173, 151);
            width: 450px;
            background: rgba(0, 0, 0, 0.4);
            padding: 40px;
            text-align: center;
            margin: auto;
            margin-top: 5%;
            font-family: 'Century Gothic', sans-serif;
        }

        .box .box-img {
            width: 200px;
            height: 200px;
            border-radius: 50%;
        }

        .box h1 {
            font-size: 50px;
            letter-spacing: 4px;
            font-weight: 400;
        }

        .box h2 {
            font-size: 30px;
            letter-spacing: 3px;
            font-weight: 300;

        }

        .one {
            text-decoration: none;
            font-size: 20px;
            font-weight: 600;
            color: grey;
        }

        .one:hover {
            color: rgb(6, 173, 151);
        }
    </style>
</head>

<body>
<div class="box">
    <?php echo '<img src="./2.jpeg" alt="" class="box-img">'?>
    <h1 class="name"><?php echo $row['username'] ?></h1>
    <h2 class="hobby"><?php echo '喜欢'.$row['hobby'] ?></h2>
    <h3><?php echo '身高'.$row['height'].'，年龄'.$row['age'].'，来自'.$row['address'] ?></h3>
    <h3><?php echo $row['aboutme']?></h3>
    <a href="login.php" class="one">登出</a>
</div>
</body>

</html lang="en">

